﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Bootstrap.MVC.Common;
using Bootstrap.MVC.Utils;

namespace Bootstrap.MVC.Widgets
{
    public class DropDownMenuModel : ModelBase, IDropDownMenuModel
    {
        public List<IDropDownItemModel> Items { set; get; }

        public LeftOrRight Align { get; set; }

        public bool DropUp { get; set; }

        #region Constructors
        public DropDownMenuModel()
            : base()
        {
            Items = new List<IDropDownItemModel>();
        }

        public DropDownMenuModel(ViewContext context)
            : base(context)
        {
            Items = new List<IDropDownItemModel>();
        }


        public DropDownMenuModel(IEnumerable<IDropDownItemModel> items)
            : base()
        {
            Guard.IsNotNull(items, "items");   

            Items = items.ToList();
        }
        #endregion Constructors
    }


    public interface IDropDownMenuModel : IModelBase
    {
        List<IDropDownItemModel> Items { set; get; }
        LeftOrRight Align { get; set; }
        bool DropUp { get; set; }
    }



    
}
